<!DOCTYPE html>
<html>
<head>
    <title>Test Results</title>
    <style>
        table {
            border-collapse: collapse;
            width: 100%;
        }

        th, td {
            border: 1px solid black;
            padding: 8px;
            text-align: left;
        }
        .red-bg {
            background-color: red;
        }
        .green-bg {
            background-color: green;
        }
    </style>
</head>
<body>
<h1>Test Results</h1>

<h2>Img file from {{.DownloadLink}}</h2>
<h2>Version: {{.Version}}</h2>
<h2>DateTime: {{.Datetime}}</h2>

<h2>XTS Result</h2>
<table>
    <tr>
        <th>Total</th>
        <th>Failure Count</th>
    </tr>
    <tr>
        <td>{{.Xts.Total}}</td>
        <td>{{.Xts.FailureNum}}</td>
    </tr>
</table>

<h3>Failure Test Cases:</h3>
<table>
    <tr>
        <th>Name</th>
        <th>Reason</th>
    </tr>
    {{range .Xts.FailureTestCase}}
    <tr>
        <td>{{.Name}}</td>
        <td>{{.Reason}}</td>
    </tr>
    {{end}}
</table>

<h2>Benchmark Result</h2>

<h3>Musl Benchmark:</h3>
<table>
    <thead>
    <tr>
        <th>Case</th>
        <th>Before (ns)</th>
        <th>After (ns)</th>
        <th>(Before - After) / Before</th>
    </tr>
    </thead>
    <tbody>
    {{.Benchmark.MuslBenchmark}}
    </tbody>
</table>

<h3>Bionic Benchmark:</h3>
<table>
    <thead>
    <tr>
        <th>Case</th>
        <th>Before (ns)</th>
        <th>After (ns)</th>
        <th>(Before - After) / Before</th>
    </tr>
    </thead>
    <tbody>
    {{.Benchmark.BionicBenchmark}}
    </tbody>
</table>
</body>
</html>
